<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>北京百勤科技PCR实验课件系统</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<script type="text/javascript" src="../js/jquery-1.7.1.js"></script>
<script type="text/javascript" src="../js/ajax.js"></script>
<script type="text/javascript" src="../js/mask.js"></script>
<script type="text/javascript">
	$(document).ready(function() {
		getTopMenu();
	});

	function getTopMenu() {
		ajaxSubmit("/Action!MenuAction_getDefaultTopMenu.go", {
			"type" : "admin",
			"locate" : "TOP"
		}, "", buildMenu, null, true, $(document), "正在加载页面，请稍后");
	}

	function buildMenu(data) {
		var list = data.datas.menuList;
		var navItems = $("#navItem");
		$.each(list, function(index, item) {
			navItems.append($(createTopMenu(item.menuName, item.menuId)));
		});
	}

	function buildChildMenu(data) {
		var list = data.datas.menuList;
		var menuContent = $("#menuContent");
		menuContent.empty();
		$.each(list, function(index, item) {
			menuContent.append($(createChildMenu(item.menuName, item.menuUrl)));
		});
	}

	function changeMenu(li, title, id) {
		$("#menuTitle").html(title);
		ajaxSubmit("/Action!MenuAction_getDefaultChildMenu.go", {
			"parentId" : id
		}, "", buildChildMenu, null, true, $(document), "正在加载页面，请稍后");
	}

	function createTopMenu(title, id) {
		var li = $("<li>");
		var a = $("<a>");
		a.html(title);
		a.attr("href", "javascript:void(0)");
		a.bind("click", function() {
			changeMenu(li, title, id);
		});
		li.append(a);
		return li;
	}

	function createChildMenu(title, url) {
		var li = $("<li>")
		var a = $("<a>");
		a.html(title);
		a.attr("href", "javascript:void(0)");
		a.bind("click", function() {
			$("#contentFrame").attr("src", url);
		});
		li.append(a);
		return li;
	}
</script>
</head>
<body>
	<!-- Begin Wrapper -->
	<div id="wrapper">
		<!-- Begin Header -->
		<div id="header">
			<div class="logo">
				<h1 class="lineone">北京百勤科技PCR实验课件系统</h1>
				<h2 class="linetwo">
					后台管理系统</a>
				</h2>
			</div>
		</div>
		<!-- End Header -->
		<!-- Begin Navigation -->
		<div id="navigation">
			<ul id="navItem">

			</ul>
		</div>
		<!-- End Navigation -->
		<!-- Begin Left Column -->
		<div id="leftcolumn">
			<div class="leftnav">
				<ul>
					<li>
						<h2 id="menuTitle">请从顶部选择菜单</h2>
						<ul id="menuContent">

						</ul>
					</li>
				</ul>
			</div>
		</div>
		<!-- End Left Column -->
		<!-- Begin Content Column -->
		<div id="content">
			<iframe id="contentFrame"></iframe>
		</div>
		<!-- End Content Column -->
		<!-- Begin Right Column -->
		<!--   <div id="rightcolumn">
  </div> -->
		<!-- End Right Column -->
		<!-- Begin Footer -->
		<div id="footer">
			<p>北京百勤科技有限公司 版权所有 COPY RIGHT 2001-2005 ALL RESERVED
				传真：010-68236592 E-mail：baiqin@baiqin.com.cn</p>
		</div>
		<!-- End Footer -->
	</div>
	<!-- End Wrapper -->
</body>
</html>
